package com.project.mapper;

import com.project.bean.LogBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/***
 * 日志mapper接口
 */
public interface LogMapper {
    /***
     * 按时间查询日志
     * @param startDate 起始日期
     * @param endDate 结束日期
     * @return 日志集合
     */
    public List<LogBean> findByDate(@Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);

    @Insert("INSERT INTO t_log(l_date,l_info) values(#{time},#{info})")
    public void addLog(@Param("time") LocalDate time,@Param("info") String info);
}
